xen/lib: Introduce printk_once() and replace some opencoded examples
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 17 May 2019 18:30:47 +0000 (19:30 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 31 May 2019 18:11:29 +0000 (19:11 +0100)
commita5ae5b67a926f34fb369fdaa7327a2f70b1c2c20
tree1bf87428957aba931c23d04df0decb9deea31322
parente2105180f99d22aad47ee57113015e11d7397e54
xen/lib: Introduce printk_once() and replace some opencoded examples

Reflow the ZynqMP message for grepability, and fix the omission of a newline.

There is a race condition where multiple cpus could race to set once_ boolean.
However, the use of this construct is mainly useful for boot time code, and
the only consequence of the race is a repeated print message.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/cpuerrata.c
xen/arch/arm/platforms/xilinx-zynqmp.c
xen/include/xen/lib.h